package org.lyh.org.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.lyh.base.domain.BaseDomain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
* 
* @TableName t_department
*/
@Data //getter  setter
@AllArgsConstructor  //全参构造
@NoArgsConstructor //无参构造
@ApiModel("部门类")
public class Department extends BaseDomain {
    @ApiModelProperty("部门ID")
    private Long id;
    @ApiModelProperty("部门编号")
    private String sn;
    @ApiModelProperty("部门名称")
    private String name;
    @ApiModelProperty("部门的上级分类层级id")
    private String dirPath;
    @ApiModelProperty("部门状态 - 1启用，0禁用")
    private Integer state;
    @ApiModelProperty("部门管理员，关联Employee表id")
    private Long managerId;
    @ApiModelProperty("上级部门")
    private Long parentId;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("修改时间")
    private Date updateTime;
    @ApiModelProperty("管理者对象")
    private Employee manager;
    @ApiModelProperty("上级部门对象")
    private Department parent;
    @ApiModelProperty("子部门对象集合")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//为空时会显示空页面
    List<Department> children = new ArrayList<>();
}
